3.56 \(\int \frac{(a+b \log (c x^n))^2}{x^3} \, dx\)

Optimal. Leaf size=52 \[ -\frac{b n \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac{\left (a+b \log \left (c x^n\right )\right )^2}{2 x^2}-\frac{b^2 n^2}{4 x^2} \]

[Out]

-(b^2*n^2)/(4*x^2) - (b*n*(a + b*Log[c*x^n]))/(2*x^2) - (a + b*Log[c*x^n])^2/(2*x^2)

________________________________________________________________________________________

Rubi [A]  time = 0.0352318, antiderivative size = 52, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.125, Rules used = {2305, 2304} \[ -\frac{b n \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac{\left (a+b \log \left (c x^n\right )\right )^2}{2 x^2}-\frac{b^2 n^2}{4 x^2} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*x^n])^2/x^3,x]

[Out]

-(b^2*n^2)/(4*x^2) - (b*n*(a + b*Log[c*x^n]))/(2*x^2) - (a + b*Log[c*x^n])^2/(2*x^2)

Rule 2305

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Lo
g[c*x^n])^p)/(d*(m + 1)), x] - Dist[(b*n*p)/(m + 1), Int[(d*x)^m*(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{
a, b, c, d, m, n}, x] && NeQ[m, -1] && GtQ[p, 0]

Rule 2304

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Log[c*x^
n]))/(d*(m + 1)), x] - Simp[(b*n*(d*x)^(m + 1))/(d*(m + 1)^2), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rubi steps

\begin{align*} \int \frac{\left (a+b \log \left (c x^n\right )\right )^2}{x^3} \, dx &=-\frac{\left (a+b \log \left (c x^n\right )\right )^2}{2 x^2}+(b n) \int \frac{a+b \log \left (c x^n\right )}{x^3} \, dx\\ &=-\frac{b^2 n^2}{4 x^2}-\frac{b n \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac{\left (a+b \log \left (c x^n\right )\right )^2}{2 x^2}\\ \end{align*}

Mathematica [A]  time = 0.0129237, size = 41, normalized size = 0.79 \[ -\frac{2 \left (a+b \log \left (c x^n\right )\right )^2+b n \left (2 a+2 b \log \left (c x^n\right )+b n\right )}{4 x^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*x^n])^2/x^3,x]

[Out]

-(2*(a + b*Log[c*x^n])^2 + b*n*(2*a + b*n + 2*b*Log[c*x^n]))/(4*x^2)

________________________________________________________________________________________

Maple [C]  time = 0.122, size = 703, normalized size = 13.5 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))^2/x^3,x)

[Out]

-1/2*b^2/x^2*ln(x^n)^2-1/2*(I*Pi*b^2*csgn(I*x^n)*csgn(I*c*x^n)^2-I*Pi*b^2*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-
I*Pi*b^2*csgn(I*c*x^n)^3+I*Pi*b^2*csgn(I*c*x^n)^2*csgn(I*c)+2*ln(c)*b^2+b^2*n+2*a*b)/x^2*ln(x^n)-1/8*(4*I*ln(c
)*Pi*b^2*csgn(I*x^n)*csgn(I*c*x^n)^2+4*ln(c)^2*b^2-Pi^2*b^2*csgn(I*c*x^n)^4*csgn(I*c)^2+4*a*b*n+2*b^2*n^2+4*a^
2+2*Pi^2*b^2*csgn(I*x^n)*csgn(I*c*x^n)^3*csgn(I*c)^2+2*Pi^2*b^2*csgn(I*x^n)^2*csgn(I*c*x^n)^3*csgn(I*c)-Pi^2*b
^2*csgn(I*x^n)^2*csgn(I*c*x^n)^2*csgn(I*c)^2-4*Pi^2*b^2*csgn(I*x^n)*csgn(I*c*x^n)^4*csgn(I*c)-2*I*Pi*b^2*n*csg
n(I*c*x^n)^3+4*I*ln(c)*Pi*b^2*csgn(I*c*x^n)^2*csgn(I*c)+4*I*Pi*a*b*csgn(I*x^n)*csgn(I*c*x^n)^2+4*I*Pi*a*b*csgn
(I*c*x^n)^2*csgn(I*c)-2*I*Pi*b^2*n*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-4*I*Pi*a*b*csgn(I*c*x^n)^3-4*I*ln(c)*Pi
*b^2*csgn(I*c*x^n)^3-4*I*ln(c)*Pi*b^2*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-4*I*Pi*a*b*csgn(I*x^n)*csgn(I*c*x^n)
*csgn(I*c)-Pi^2*b^2*csgn(I*c*x^n)^6+8*ln(c)*a*b+4*ln(c)*b^2*n+2*Pi^2*b^2*csgn(I*c*x^n)^5*csgn(I*c)+2*Pi^2*b^2*
csgn(I*x^n)*csgn(I*c*x^n)^5+2*I*Pi*b^2*n*csgn(I*x^n)*csgn(I*c*x^n)^2+2*I*Pi*b^2*n*csgn(I*c*x^n)^2*csgn(I*c)-Pi
^2*b^2*csgn(I*x^n)^2*csgn(I*c*x^n)^4)/x^2

________________________________________________________________________________________

Maxima [A]  time = 1.15863, size = 96, normalized size = 1.85 \begin{align*} -\frac{1}{4} \, b^{2}{\left (\frac{n^{2}}{x^{2}} + \frac{2 \, n \log \left (c x^{n}\right )}{x^{2}}\right )} - \frac{b^{2} \log \left (c x^{n}\right )^{2}}{2 \, x^{2}} - \frac{a b n}{2 \, x^{2}} - \frac{a b \log \left (c x^{n}\right )}{x^{2}} - \frac{a^{2}}{2 \, x^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2/x^3,x, algorithm="maxima")

[Out]

-1/4*b^2*(n^2/x^2 + 2*n*log(c*x^n)/x^2) - 1/2*b^2*log(c*x^n)^2/x^2 - 1/2*a*b*n/x^2 - a*b*log(c*x^n)/x^2 - 1/2*
a^2/x^2

________________________________________________________________________________________

Fricas [A]  time = 0.863724, size = 204, normalized size = 3.92 \begin{align*} -\frac{2 \, b^{2} n^{2} \log \left (x\right )^{2} + b^{2} n^{2} + 2 \, b^{2} \log \left (c\right )^{2} + 2 \, a b n + 2 \, a^{2} + 2 \,{\left (b^{2} n + 2 \, a b\right )} \log \left (c\right ) + 2 \,{\left (b^{2} n^{2} + 2 \, b^{2} n \log \left (c\right ) + 2 \, a b n\right )} \log \left (x\right )}{4 \, x^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2/x^3,x, algorithm="fricas")

[Out]

-1/4*(2*b^2*n^2*log(x)^2 + b^2*n^2 + 2*b^2*log(c)^2 + 2*a*b*n + 2*a^2 + 2*(b^2*n + 2*a*b)*log(c) + 2*(b^2*n^2
+ 2*b^2*n*log(c) + 2*a*b*n)*log(x))/x^2

________________________________________________________________________________________

Sympy [B]  time = 1.74155, size = 128, normalized size = 2.46 \begin{align*} - \frac{a^{2}}{2 x^{2}} - \frac{a b n \log{\left (x \right )}}{x^{2}} - \frac{a b n}{2 x^{2}} - \frac{a b \log{\left (c \right )}}{x^{2}} - \frac{b^{2} n^{2} \log{\left (x \right )}^{2}}{2 x^{2}} - \frac{b^{2} n^{2} \log{\left (x \right )}}{2 x^{2}} - \frac{b^{2} n^{2}}{4 x^{2}} - \frac{b^{2} n \log{\left (c \right )} \log{\left (x \right )}}{x^{2}} - \frac{b^{2} n \log{\left (c \right )}}{2 x^{2}} - \frac{b^{2} \log{\left (c \right )}^{2}}{2 x^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))**2/x**3,x)

[Out]

-a**2/(2*x**2) - a*b*n*log(x)/x**2 - a*b*n/(2*x**2) - a*b*log(c)/x**2 - b**2*n**2*log(x)**2/(2*x**2) - b**2*n*
*2*log(x)/(2*x**2) - b**2*n**2/(4*x**2) - b**2*n*log(c)*log(x)/x**2 - b**2*n*log(c)/(2*x**2) - b**2*log(c)**2/
(2*x**2)

________________________________________________________________________________________

Giac [A]  time = 1.23047, size = 122, normalized size = 2.35 \begin{align*} -\frac{b^{2} n^{2} \log \left (x\right )^{2}}{2 \, x^{2}} - \frac{{\left (b^{2} n^{2} + 2 \, b^{2} n \log \left (c\right ) + 2 \, a b n\right )} \log \left (x\right )}{2 \, x^{2}} - \frac{b^{2} n^{2} + 2 \, b^{2} n \log \left (c\right ) + 2 \, b^{2} \log \left (c\right )^{2} + 2 \, a b n + 4 \, a b \log \left (c\right ) + 2 \, a^{2}}{4 \, x^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2/x^3,x, algorithm="giac")

[Out]

-1/2*b^2*n^2*log(x)^2/x^2 - 1/2*(b^2*n^2 + 2*b^2*n*log(c) + 2*a*b*n)*log(x)/x^2 - 1/4*(b^2*n^2 + 2*b^2*n*log(c
) + 2*b^2*log(c)^2 + 2*a*b*n + 4*a*b*log(c) + 2*a^2)/x^2